package com.xingkeduo.model.param;

import com.xingkeduo.model.param.common.BaseParam;

public class ActivityCodeParam extends BaseParam {
    /** */
    private Long id;

    /** */
    private String code;

    /** 0作废 1有效 2已使用*/
    private Integer status;

    /** 1 招商银行活动码 2金色世纪积分商城 3优惠券兑换码（本部）4京东免费兑换码  5京东19.9一口价兑换码  6开始吧  7京东白条兑换码  8 会员卡兑换*/
    private Integer type;

    /** 店铺ID*/
    private Integer storeId;

    /** 卡券id*/
    private Long marketingId;

    /** 类型  0券 1卡 2券包*/
    private Integer marketingType;
    
    private String marketingInfo;

    /** item_id对应口碑item_id*/
    private String itemId;
    
    private String userInfo;
    
    private String exchangeEndTime;
    
    private String exchangeStartTime;
    
    private String createEndTime;
    
    private String createStartTime;
    
    
    public String getCreateEndTime() {
		return createEndTime;
	}

	public void setCreateEndTime(String createEndTime) {
		this.createEndTime = createEndTime;
	}

	public String getCreateStartTime() {
		return createStartTime;
	}

	public void setCreateStartTime(String createStartTime) {
		this.createStartTime = createStartTime;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getStoreId() {
        return storeId;
    }

    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    public Long getMarketingId() {
        return marketingId;
    }

    public void setMarketingId(Long marketingId) {
        this.marketingId = marketingId;
    }

    public Integer getMarketingType() {
        return marketingType;
    }

    public void setMarketingType(Integer marketingType) {
        this.marketingType = marketingType;
    }

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId == null ? null : itemId.trim();
    }
    
	public String getMarketingInfo() {
		return marketingInfo;
	}

	public void setMarketingInfo(String marketingInfo) {
		this.marketingInfo = marketingInfo;
	}
	
	public String getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(String userInfo) {
		this.userInfo = userInfo;
	}

	public String getExchangeEndTime() {
		return exchangeEndTime;
	}

	public void setExchangeEndTime(String exchangeEndTime) {
		this.exchangeEndTime = exchangeEndTime;
	}

	public String getExchangeStartTime() {
		return exchangeStartTime;
	}

	public void setExchangeStartTime(String exchangeStartTime) {
		this.exchangeStartTime = exchangeStartTime;
	}

	public static enum ActivityCodeStatusEnum {
    	//卡卷状态--0作废 1有效 2已使用
    	UNKNOWN("UNKNOWN","未知",-1),//未知；
    	DISCARD("DISCARD","已作废",0),
    	EFFECTIVE("EFFECTIVE","有效",1),
    	USED("USED","已使用",2);
		
		private String statusType;
		private String desc;
		private int code;
		
		public String getStatusType() {
			return statusType;
		}

		public void setStatusType(String statusType) {
			this.statusType = statusType;
		}
		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
		
		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}
		
		private ActivityCodeStatusEnum(String statusType, String desc,int code) {
			this.statusType=statusType;
			this.desc = desc;
			this.code = code;
		}

		public static ActivityCodeStatusEnum parse(String statusType) {
			for (ActivityCodeStatusEnum activityCodeStatusEnum : values()) {
				if (statusType.equalsIgnoreCase(activityCodeStatusEnum.getStatusType())) {
					return activityCodeStatusEnum;
				}
			}
			return UNKNOWN;
		}
		public static ActivityCodeStatusEnum parseStatus(int code) {
			for (ActivityCodeStatusEnum activityCodeStatusEnum : values()) {
				if (code==activityCodeStatusEnum.getCode()) {
					return activityCodeStatusEnum;
				}
			}
			return UNKNOWN;
		}

	}
}